<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="telephone=no" name="format-detection">
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <title>宣和艺网-共享艺术服务平台</title>
    <link rel="stylesheet" type="text/css"  th:href="@{/css/mobile/public.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css/mobile/jquery.bxslider.css}" />
    <link rel="stylesheet" type="text/css" th:href="@{/css/mobile/style.css}" />
    <script type="text/javascript"  th:src="@{/js/mobile/jquery1.11.3.min.js}" ></script>
    <script type="text/javascript" th:src="@{/js/mobile/jquery.bxslider.min.js}" ></script>
    <script type="text/javascript" th:src="@{/js/mobile/index.js}" ></script>
    <script type="text/javascript" th:src="@{/js/baiduhm.js}" ></script>
    <script type="text/javascript" th:src="@{/js/mobile/redirectPc.js}"></script>


</head>

<body>
<!--手机搜索begin-->
<div id="nav-search">

</div>
<div class="drawer-section search_div">
    <div class="search_con">
        <form action="/m/index/search" style="width: 100%;height: 100%;">
            <input name="names" type="text" class="input1" value="搜索" onFocus="if(value=='搜索'){value=''}"
                   onBlur="if(value==''){value='搜索'}" />

            <input type="submit" value="搜索" class="bnt1" />
            <div style="clear: both">
                <input type="radio" style="-webkit-appearance:radio;" id="artist" name="type" value=1 checked>
                <label for="artist">艺术家</label>
                <input type="radio" style="-webkit-appearance:radio;" id="artwork" name="type" value=2>
                <label for="artwork">艺术品</label>
                <input type="radio" style="-webkit-appearance:radio;" id="organization" name="type" value=3>
                <label for="organization">机构</label>
                <input type="radio" style="-webkit-appearance:radio;" id="article" name="type" value=4>
                <label for="article">文章</label>
            </div>
        </form>
    </div>
</div>
<!--top-->
<div id="top">
    <div class="wrap clearfloat">
        <div th:replace="~{mobile/component/header :: index_menu}"></div>

        <div class="topPhone clearfloat">

        </div>
    </div>
    <div class="muen1" style="right: 56px;"> <span class="muenX"></span> <span class="muenY">
        <img class="img1" th:src="@{/images/mobile/search_image.png}" />
      </span> <span class="muenZ"></span> </div>
    <div class="muen"> <span class="muenX"></span> <span class="muenY"></span> <span class="muenZ"></span> </div>
</div>
<!--/top-->

<!--main-->
<div class="main">
    <div class="banner">
        <ul class="slider1">
            <li th:each="banner:${banners}">
                <a href="">
                    <img class="img1" th:src="${banner.url}" />
                    <img class="img2" th:src="${banner.url}" />
                </a>
            </li>

        </ul>
    </div>

    <div style="text-align: center;background: #fff;color: #b68036;padding-top: 25px;font-size: 22px;">
        <p>艺术家 艺术机构 收藏爱好者</p>
        <p>共享艺术推广服务的互联网平台</p>
    </div>

    <div class="homeZpc" style="background: #fff;padding-bottom: 0px;" th:each="eventExhibition:${eventExhibitions}">
        <div class="wrap clearfloat">
            <div class="homeNewsH clearfloat">
                <div class="line"></div>
                <div class="left" style="margin-top: 0px;">
                    <h3><em>活动展览</em>
                    </h3>
                </div>
            </div>
            <div class="left">
                <a th:href="@{/m/event(id=${eventExhibition.id})}">
                <div class="pic"><img
                        th:src="${eventExhibition.url}" /></div>
                <div class="picBg"></div>
                </a>
            </div>
            <div class="right">
                <h2>[[ ${eventExhibition.name} ]]</h2>
                <div class="line"></div>
                <div class="homeZpcCont">
                    <p> 举办单位： <span style="color:#b68036">[[ ${ eventExhibition.departName } ]]</span> </p>
                    <p> 参展艺术家： <a th:each="artist:${eventExhibition.list}"
                                       th:href="@{/m/artist(id=${artist.id})}"
                                       target="_blank"
                                       style="margin-right: 10px;color: #b68036;">[[ ${
                        artist.name } ]]</a> </p>
                    <p> 活动地址： <span style="color: #333;"><a th:href="@{/m/event(id=${eventExhibition.id})}">[[ ${eventExhibition.address} ]]</a></span> </p>
                    <p>活动详情：<a th:href="@{/m/event(id=${eventExhibition.id})}"><span id="event-content" style="color: #666;">[[ ${eventExhibition.content} ]]</span><span style="color: #b68036;">[详细+]</span></a></p>


                </div>

            </div>
        </div>
    </div>

    <script type="text/javascript">
        $(document).ready(function() {
            // 获取活动详情元素和详细链接元素
            const $eventContent = $('#event-content');
            const $moreLink = $('#more-link');
            // 获取完整的活动详情内容
            const fullContent = $eventContent.text();
            // 正则匹配中文
            const chineseRegex = /[\u4e00-\u9fa5]/g;
            const chineseCharacters = fullContent.match(chineseRegex) || [];

            if (chineseCharacters.length > 40) {
                // 截取前 100 个中文字符
                let count = 0;
                let shortContent = '';
                for (let i = 0; i < fullContent.length; i++) {
                    if (chineseRegex.test(fullContent[i])) {
                        count++;
                    }
                    shortContent += fullContent[i];
                    if (count === 40) {
                        break;
                    }
                }
                // 显示前 100 个中文字符并添加省略号
                $eventContent.text(shortContent + '...');
                // 显示 [详细+] 链接
                $moreLink.show();
            }

            // 为 [详细+] 链接添加点击事件
            $moreLink.on('click', function() {
                // 显示完整的活动详情内容
                $eventContent.text(fullContent);
                // 隐藏 [详细+] 链接
                $(this).hide();
            });
        });
    </script>

    <div class="homeNews">
        <div class="wrap">
            <div class="homeNewsH clearfloat">
                <div class="line"></div>
                <div class="left">
                    <h3><em>新闻资讯</em>
                        <span>网罗各种艺术资讯</span>
                    </h3>
                </div>
                <div class="right homeNewsTab"> <a class="on" href="javascript:">艺术评论</a> <a href="javascript:">市场资讯</a>
                </div>
            </div>
            <div class="homeNewsW">
                <div class="homeNewsInner clearfloat">
                    <ul class="left">
                        <li class="clearfloat" th:each="article:${articleList1}">
                            <div class="homeNewsNum">
                                <a th:href="@{/m/index/article(id=${article.id})}"><img
                                        th:src="${article.url}"
                                        onload="resizeImage('8rem','6rem',this)">
                                </a>
                            </div>
                            <div class="homeNewsCont">
                                <div class="homeNewsContH">
                                    <a th:href="@{/m/index/article(id=${article.id})}">
                                        <h3 class="single-line"><a href="">[[ ${article.name} ]]</a></h3>
                                        <p>[[${article.createDate}]]</p>
                                    </a>

                                </div>

                            </div>
                        </li>


                    </ul>

                </div>
                <div class="homeNewsInner clearfloat">
                    <ul class="left">
                        <li class="clearfloat" th:each="article:${articleList2}">
                            <div class="homeNewsNum">
                                <a th:href="@{/m/index/article(id=${article.id})}"><img
                                    th:src="${article.url}"
                                    onload="resizeImage('8rem','6rem',this)">
                                </a>
                            </div>
                            <div class="homeNewsCont">
                                <div class="homeNewsContH">
                                    <a th:href="@{/m/index/article(id=${article.id})}">
                                    <h3 class="single-line"><a href="">[[ ${article.name} ]]</a></h3>
                                    <p>[[${article.createDate}]]</p>
                                    </a>

                                </div>

                            </div>
                        </li>

                    </ul>

                </div>
            </div>
        </div>
    </div>

    <div class="homeSp" style="background: #fff;">
        <div class="wrap">
            <div class="homeSpT clearfloat">
                <div class="homeNewsH clearfloat">
                    <div class="line"></div>
                    <div class="left" style="margin-top: 0px;">
                        <h3><em>作品在线</em>
                            <span>让艺术作品得到充分展示</span>
                        </h3>
                    </div>
                </div>

                <div class="right">
                    <div class="homeSpTW">
                        <ul class="sliderHomeSpT">
                            <li style="">
                                <div class="homeSpTInner" th:each="onLineArtwork,iterStat:${onLineArtworks}" th:if="${iterStat.index < 2} ">
                                    <a th:href="@{/m/index/online/artwork/detail(id=${onLineArtwork.id})}">
                                    <div
                                            style="width: 100%;height:14rem;background-color: #eee;align-items: center;justify-content: center;display: flex;margin-bottom: 0.5rem;">
                                        <img
                                                th:src="${onLineArtwork.url}">
                                    </div>
                                    <p style="text-align: center;"><span style="color: #b68036;font-size: 20px;">[[ ${onLineArtwork.name} ]]</span><span
                                            style="color: #ccc;padding: 2px 6px;margin-left: 5px;">[[ ${onLineArtwork.artistName} ]]</span></p>
                                    <div style="width: 33%;float: left;">
                                        <p style="text-align: center;">编号</p>
                                        <p style="text-align: center;font-size: 12px;">[[ ${onLineArtwork.artworkNum} ]]</p>
                                    </div>
                                    <div style="float: left;width: 1px;height: 26px;border-right: 1px solid #b68036;position: relative;top: 12px;"></div>
                                    <div style="width: 33%;float: left;">
                                        <p style="text-align: center;">规格</p>
                                        <p style="text-align: center;font-size:12px;">[[ ${onLineArtwork.spec} ]]</p>
                                    </div>
                                    <div style="float: left;width: 1px;height: 26px;border-right: 1px solid #b68036;position: relative;top: 12px;"></div>
                                    <div style="width: 32%;float: left;">
                                        <p style="text-align: center;">价格</p>
                                        <p style="text-align: center;font-size: 12px;">[[ ${onLineArtwork.price==null||onLineArtwork.price==0?"****":onLineArtwork.price} ]] 元</p>
                                    </div>
                                    </a>


                                </div>
                            </li>
                            <li style="">

                                <div class="homeSpTInner" th:each="onLineArtwork,iterStat:${onLineArtworks}" th:if="${iterStat.index < 4 &&iterStat.index > 1} ">
                                    <a th:href="@{/m/index/online/artwork/detail(id=${onLineArtwork.id})}">
                                    <div
                                            style="width: 100%;height:14rem;background-color: #eee;align-items: center;justify-content: center;display: flex;margin-bottom: 0.5rem;">
                                        <img
                                                th:src="${onLineArtwork.url}">
                                    </div>
                                    <p style="text-align: center;"><span style="color: #b68036;font-size: 20px;">[[ ${onLineArtwork.name} ]]</span><span
                                            style="color: #ccc;padding: 2px 6px;margin-left: 5px;">[[ ${onLineArtwork.artistName} ]]</span></p>
                                    <div style="width: 33%;float: left;">
                                        <p style="text-align: center;">编号</p>
                                        <p style="text-align: center;font-size: 12px;">[[ ${onLineArtwork.artworkNum} ]]</p>
                                    </div>
                                    <div style="float: left;width: 1px;height: 26px;border-right: 1px solid #b68036;position: relative;top: 12px;"></div>
                                    <div style="width: 33%;float: left;">
                                        <p style="text-align: center;">规格</p>
                                        <p style="text-align: center;font-size:12px;">[[ ${onLineArtwork.spec} ]]</p>
                                    </div>
                                    <div style="float: left;width: 1px;height: 26px;border-right: 1px solid #b68036;position: relative;top: 12px;"></div>
                                    <div style="width: 32%;float: left;">
                                        <p style="text-align: center;">价格</p>
                                        <p style="text-align: center;font-size: 12px;">[[ ${onLineArtwork.price==null||onLineArtwork.price==0?"****":onLineArtwork.price} ]] 元</p>
                                    </div>
                                    </a>

                                </div>
                            </li>

                            <li style="">

                                <div class="homeSpTInner" th:each="onLineArtwork,iterStat:${onLineArtworks}" th:if="${iterStat.index < 6 &&iterStat.index > 3} ">
                                    <a th:href="@{/m/index/online/artwork/detail(id=${onLineArtwork.id})}">
                                    <div
                                            style="width: 100%;height:14rem;background-color: #eee;align-items: center;justify-content: center;display: flex;margin-bottom: 0.5rem;">
                                        <img
                                                th:src="${onLineArtwork.url}">
                                    </div>
                                    <p style="text-align: center;"><span style="color: #b68036;font-size: 20px;">[[ ${onLineArtwork.name} ]]</span><span
                                            style="color: #ccc;padding: 2px 6px;margin-left: 5px;">[[ ${onLineArtwork.artistName} ]]</span></p>
                                    <div style="width: 33%;float: left;">
                                        <p style="text-align: center;">编号</p>
                                        <p style="text-align: center;font-size: 12px;">[[ ${onLineArtwork.artworkNum} ]]</p>
                                    </div>
                                    <div style="float: left;width: 1px;height: 26px;border-right: 1px solid #b68036;position: relative;top: 12px;"></div>
                                    <div style="width: 33%;float: left;">
                                        <p style="text-align: center;">规格</p>
                                        <p style="text-align: center;font-size:12px;">[[ ${onLineArtwork.spec} ]]</p>
                                    </div>
                                    <div style="float: left;width: 1px;height: 26px;border-right: 1px solid #b68036;position: relative;top: 12px;"></div>
                                    <div style="width: 32%;float: left;">
                                        <p style="text-align: center;">价格</p>
                                        <p style="text-align: center;font-size: 12px;">[[ ${onLineArtwork.price==null||onLineArtwork.price==0?"****":onLineArtwork.price} ]] 元</p>
                                    </div>
                                    </a>


                                </div>
                            </li>
                            <li style="">

                                <div class="homeSpTInner" th:each="onLineArtwork,iterStat:${onLineArtworks}" th:if="${iterStat.index < 8 &&iterStat.index > 5} ">
                                    <a th:href="@{/m/index/online/artwork/detail(id=${onLineArtwork.id})}">
                                    <div
                                            style="width: 100%;height:14rem;background-color: #eee;align-items: center;justify-content: center;display: flex;margin-bottom: 0.5rem;">
                                        <img
                                                th:src="${onLineArtwork.url}">
                                    </div>
                                    <p style="text-align: center;"><span style="color: #b68036;font-size: 20px;">[[ ${onLineArtwork.name} ]]</span><span
                                            style="color: #ccc;padding: 2px 6px;margin-left: 5px;">[[ ${onLineArtwork.artistName} ]]</span></p>
                                    <div style="width: 33%;float: left;">
                                        <p style="text-align: center;">编号</p>
                                        <p style="text-align: center;font-size: 12px;">[[ ${onLineArtwork.artworkNum} ]]</p>
                                    </div>
                                    <div style="float: left;width: 1px;height: 26px;border-right: 1px solid #b68036;position: relative;top: 12px;"></div>
                                    <div style="width: 33%;float: left;">
                                        <p style="text-align: center;">规格</p>
                                        <p style="text-align: center;font-size:12px;">[[ ${onLineArtwork.spec} ]]</p>
                                    </div>
                                    <div style="float: left;width: 1px;height: 26px;border-right: 1px solid #b68036;position: relative;top: 12px;"></div>
                                    <div style="width: 32%;float: left;">
                                        <p style="text-align: center;">价格</p>
                                        <p style="text-align: center;font-size: 12px;">[[ ${onLineArtwork.price==null||onLineArtwork.price==0?"****":onLineArtwork.price} ]] 元</p>
                                    </div>
                                    </a>


                                </div>
                            </li>

                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>


    <div class="homeAdvance">
        <div class="wrap">
            <div class="homeAdvanceTit">
                <h2>宣和艺网的<span>艺术家们</span></h2>
                <p>宣和艺网目前已荟聚了数千位艺术家，并积极对他们的作品进行推广。</p>
            </div>

            <div class="homeSpB">
                <div class="homeSpBW">
                    <div class="lineW"> <span></span> </div>
                    <ul class="sliderHomeSpB clearfloat">
                        <li>
                            <div style="height: 11.5rem;" th:each="indexArtist,iterStat:${indexArtists}" th:if="${iterStat.index < 2 &&iterStat.index > -1} ">
                                <a th:href="@{/m/artist(id=${indexArtist.id})}">
                                    <div class="num" style="background: none;"><img
                                            th:src="${indexArtist.url}">
                                    </div>
                                    <p>[[ ${indexArtist.name} ]]</p>
                                    <!--<span></span>-->
                                </a>
                            </div>


                        </li>
                        <li>
                            <div style="height: 11.5rem;" th:each="indexArtist,iterStat:${indexArtists}" th:if="${iterStat.index < 4 &&iterStat.index > 1} ">
                                <a th:href="@{/m/artist(id=${indexArtist.id})}">
                                    <div class="num" style="background: none;"><img
                                            th:src="${indexArtist.url}">
                                    </div>
                                    <p>[[ ${indexArtist.name} ]]</p>
                                    <!--<span></span>-->
                                </a>
                            </div>

                        </li>
                        <li>
                            <div style="height: 11.5rem;" th:each="indexArtist,iterStat:${indexArtists}" th:if="${iterStat.index < 6 &&iterStat.index > 3} ">
                                <a th:href="@{/m/artist(id=${indexArtist.id})}">
                                    <div class="num" style="background: none;"><img
                                            th:src="${indexArtist.url}">
                                    </div>
                                    <p>[[ ${indexArtist.name} ]]</p>
                                    <!--<span></span>-->
                                </a>
                            </div>

                        </li>
                        <li>
                            <div style="height: 11.5rem;" th:each="indexArtist,iterStat:${indexArtists}" th:if="${iterStat.index < 8 &&iterStat.index > 5} ">
                                <a th:href="@{/m/artist(id=${indexArtist.id})}">
                                    <div class="num" style="background: none;"><img
                                            th:src="${indexArtist.url}">
                                    </div>
                                    <p>[[ ${indexArtist.name} ]]</p>
                                    <!--<span></span>-->
                                </a>
                            </div>

                        </li>

                    </ul>
                </div>
            </div>
                  </div>
    </div>

    <div class="homeNews" style="margin-bottom: 0.5rem;padding-top: 0px;">
        <div class="wrap">
            <div class="homeNewsH clearfloat">
                <div class="line"></div>
                <div class="left">
                    <h3><em>艺术机构</em>
                        <span>为艺术机构提供全面的展示和交流</span>
                    </h3>
                </div>

            </div>

            <div class="homeDzzxBW">
                <ul class="sliderHomeDzzc clearfloat">
                    <li th:each="depart:${departs}">
                        <a th:href="@{/m/depart(id=${depart.id})}">
                        <div class="pic"><img
                                th:src="${depart.url}" />
                        </div>
                        <p>[[ ${depart.name} ]]</p>
                        </a>
                    </li>
                </ul>
            </div>

        </div>
    </div>

</div>

<!--/main-->

<!--footer-->
<div th:replace="~{mobile/component/footer :: footer}"></div>
<!--/footer-->

<!--wap-->
<div th:replace="~{mobile/component/footer :: footer_menu}"></div>
<!--/wap-->

<div class="wapBg"></div>
</body>
<script type="text/javascript">
    $('.slider1').bxSlider({
        'auto': true,
        'controls': true,
        'touchEnabled': true,
        'pager': true,
        'speed': 1000,
        'pause': 4000,

    })

    $('.sliderHomeSpT').bxSlider({
        'auto': false,
        'controls': true,
        'touchEnabled': true,
        'pager': true,

    })

    var lineW = $(".lineW span").width();
    $('.sliderHomeSpB').bxSlider({
        'auto': false,
        infiniteLoop: true,
        'controls': true,
        'touchEnabled': true,
        'pager': true,
        'slideWidth': '204',
        'minSlides': 2,
        'maxSlides': 5,
        'moveSlides': 5,
        onSlideAfter: function ($slideElement, oldIndex, newIndex) {
            var num = $(".homeSpBW .bx-pager .bx-pager-item").length;
            var lineWW = $(".lineW").width();


            if (newIndex == 0) {
                $(".lineW span").css({
                    "width": lineW + 'px'
                })
            } else {
                $(".lineW span").css({
                    "width": (lineWW / num) * (newIndex + 1) + 'px'
                })
            }

        },


    })

    $('.sliderHomeDzzc').bxSlider({
        'auto': true,
        'controls': true,
        'touchEnabled': true,
        'pager': false,
        'slideWidth': '280',
        'minSlides': 2,
        'maxSlides': 4,
        'moveSlides': 1,
        'speed': 600,
        //	    'slideMargin': 20
    })





</script>

</html>
